-content_for :modal_title do
  -if f.object.new_record?
    Create a new regulation section
  -else
    Edit regulation section

.row-fluid
  .span2{:class => error_class(f, :program)}
    %label{:for => "section-program_id"} Program
    %select#section-program_id.input-small{:name => "section[program_id]", :placeholder => "SOX", :type => "text"}
      %option{:value => ""}
      -Program.all.each do |program|
        -if f.object.program_id == program.id
          %option{:value => program.id, :selected => true}=program.slug
        -else
          %option{:value => program.id}=program.slug
    =error_messages_inline(f, :program)

  .span2{:class => error_class(f, :slug)}
    %label{:for => "section-code"} Code
    %input#section-code.inputtext-small{:placeholder => "SOX", :type => "text", :value => f.object.slug, :name => 'section[slug]'}
    =error_messages_inline(f, :slug)

  .span1.disabled{:class => error_class(f, :version)}
    %label{:for => "section-version"} Version
    %input#section-version.input-supermini{:placeholder => "SOX", :type => "text", :value => nil, :name => 'section[version]'}
    =error_messages_inline(f, :version)

  .span7.disabled{:class => error_class(f, :status)}
    %label{:for => "section-status"} Status
    %select#section-status.input-small{ :name => 'section[status]', :value => nil }
      %option Deprecated
      %option Open
    =error_messages_inline(f, :status)

.row-fluid
  .span12{:class => error_class(f, :title)}
    %label{:for => "section-title"} Title
    %input#section-title.span12{:placeholder => "Title", :type => "text", :value => f.object.title, :name => 'section[title]'}
    =error_messages_inline(f, :title)

.row-fluid
  %label{:for => "section-description"} Text of Section:
.row-fluid{"control-group" => ""}
  .span12.well{:class => error_class(f, :description)}
    %textarea#section-description.span12{:placeholder => "", :rows => "4", :name => 'section[description]'}=f.object.description
    =error_messages_inline(f, :description)

.row-fluid
  .span12.disabled{:class => error_class(f, :url)}
    %label{:for => "section-url"} URL for this section (optional)
    %input#section-link.span12{:placeholder => "http://", :type => "text", :value => nil, :name => 'section[url]'}
    =error_messages_inline(f, :url)

-if !f.object.new_record?
  =render :partial => 'shared/object_info', :locals => { :object => f.object, :approved => false }
